Skip to content

feat(record-page): one tab per related list, and an Overview rail that sums up the other tabs - #35763

Merged
os-zhuang merged 3 commits into
mainfrom
claude/issue-35595-record-tabs-rail
Nov 20, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/issue-35595-record-tabs-rail

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #35595
Fixes #35596

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户看到的变化:记录页第一个页签是「概览」,阶段条和关键字段只在概览顶部、占满整行;之后每张子表一个页签,空的灰显不带数字,放不下的才收进「更多」;附件、审批、动态各有页签,页面底部不再挂审批区和附件卡。概览右侧换成摘要卡:审批、附件、最近动态、其他有记录的子表,空的不显示,点标题进对应页签。右栏原来能拖动排序、隐藏子表卡片的按钮随卡片一起去掉;已保存的顺序和隐藏仍然有效,用「恢复默认顺序」「显示」可以还原。原来单个「相关」页签的旧链接会打开「概览」。
  • 为什么:记录页改版专题里的页签规则和概览右栏两张卡,按您说的「列出所有子表、按宽度收下拉、右栏不显示空子表」来做。
  • 如果判断错:只影响记录页的版面,不动数据和应用配置;最坏是页签顺序或右栏卡片不如预期,撤回这一次合并即可恢复。
  • 需要您做的:无。改动约 4,600 行(三分之二是测试),超过 3,000 行,交审批人批准后合并。

What changes

The record page's tab row and its right column are redrawn. This supersedes #28469 (empty lists sank into the dropdown even on a row with room for them); that partition is retired.

Tabs (#35595).

  • Overview first, then one tab per side related list in relatedLists order, then Attachments, Approvals and Activity last.
  • Every tab is there at first paint, and none moves when the counts land.
  • An empty list keeps its place, greyed and with no number. A list whose count read is refused keeps its place with no number and is not greyed.
  • The only fold is the row's width: the tabs that do not fit go into 「更多 N ▾」, and its items keep their counts. Approvals carries a dot while a request waits, not a count.
  • A tab that merges several tables (only an explicit page can write one) carries no count (page:tabs computeCount: more than one probe, or more than one list shown).
  • The stage path and key fields sit across the full width on Overview only. Every other tab draws its block in their place.
  • A page drawn as written that places no approvals or attachments panel gets them as tabs of its first tab strip (withFallbackRecordTabs), not as bands at the page's foot.
  • The header's approval tag opens the Approvals tab.
  • A page with several record:details nodes draws its approval band once, on the first body that reaches it, recall included (ApprovalBandOnceScope, record page: a synthesized page that falls back to page tabs may still draw the approval-lock band once per details part #35483 / record page: an authored page with two details nodes draws the approval-lock band in each #35484).

Right rail (#35596).

  • On Overview, the right column sums up the other tabs in this order: Approvals, Attachments, Recent activity, then 「其他相关」 with one card for each side list that has records.
  • Each card has a title that opens its tab, a grey count and at most three rows.
  • A card with nothing to show is not drawn, and the 「还有 N 个空关联」 line is gone.
  • Nothing in the rail is editable. A rail with no cards folds away.
  • A drawer or pane (embedded) draws no rail and no right-column switch.
  • The rail's rows come from the page payload (RelatedCountStore.takeRows). The rail does no read of its own unless the payload did not carry the rows. Under StrictMode an effect re-run finds the hand-off already spent, so each card caches its answer per question (useSummaryRows).

Header region (#35679's fence). After #35679 merged, I made two small edits there, and the coordinator approved both (claim amendment 7028805451):

  • the approval tag's click opens the 审批 tab;
  • the ⊟ right-column switch is not drawn when embedded.

The strip's move to Overview needed nothing in the header region.

Size. 66 files, +3315 / −1283 (about 4.6k lines). About two thirds of that is tests (3,046 lines of test and e2e changes). The 3,000-line split was lifted for this one PR.

Tests

New pins
  • plugin-detail/src/__tests__/RecordTabRow.widthOnly-35595.test.tsx: the width-only fold, the muted empty tab, the 审批 dot, every tab at first paint with no moves (MutationObserver), and a refused count.
  • plugin-detail/src/synth/__tests__/recordTabRow.widthOnly-35595.test.ts: the layout rule. The counts never decide a slot (CONTROL), and the partition is retired from the module.
  • plugin-detail/src/__tests__/RecordPageColumns.readerArrangement-35595.test.tsx: the stored arrangement still orders the tabs, and the reader move/hide controls are retired.
  • plugin-detail/src/__tests__/DetailView.approvalBandOnce-35484.test.tsx: two details bodies draw one band.
  • app-shell/.../RecordDetailView.fallbackRecordTabs-35595.test.ts: approvals and attachments become tabs of the first strip.
  • components/src/__tests__/page-tabs-one-table-one-count-35595.test.tsx: a merged tab carries no count; CONTROL, a one-table tab does.
  • app-shell/.../RecordDetailView.recordOpenRequests-12701.test.tsx, new describe for record page: an authored page with two details nodes draws the approval-lock band in each #35484: an authored page with two details nodes shows 'Locked for approval' once, with one recall lever; CONTROL, the one-body page.
  • app-shell/.../RecordDetailView.approvalDeclaredActions.test.tsx: the tag opens the 审批 tab.
  • ui/e2e/record-tabs-rail-35595.spec.ts (Playwright, Chromium, zh-CN), each case with a CONTROL:
    • the fold: the row is sized from its own measured tab widths to hold exactly eight tabs plus the trigger (half a tab short of the ninth), with 「更多 4」 holding 任务 6 / 附件 2 / 审批 dot / 动态 4; CONTROL, every tab at 1184 px;
    • the Overview strip spans both columns at 1280 × 800;
    • the rail and strip are absent on another tab; CONTROL, back on Overview;
    • a rail card title opens its tab; the order is 审批, 附件, 最近动态, 其他相关, sized radius 8 / title 13 px / row 26 px.
Migrated and retired tests

Retired (#28469 records-first partition, the shared Related tab's card stack):

  • plugin-detail/src/__tests__/RecordTabRow.recordsFirst-28469.test.tsx, replaced by RecordTabRow.widthOnly-35595
  • plugin-detail/src/synth/__tests__/recordTabRow-28469.test.ts, replaced by recordTabRow.widthOnly-35595
  • plugin-detail/src/__tests__/RelatedCardStack-27055.test.tsx (RelatedCardStack is no longer drawn on the page)

Migrated (tabs instead of the Related tab, rail cards instead of the right-column stack, ?related= instead of ?tab=):

Runs

All runs went through scripts/pm/os-verify-lock.sh.

After merging origin/main up to c321914 (the tree of head 7557c03; the later merge of ca4ec2a touched only ui/packages/auth):

  • vitest run packages/plugin-detail/: 391 files passed / 1 skipped, 3563 tests passed / 18 skipped, VERDICT command-exit 0.
  • vitest run packages/app-shell/src/views/RecordDetailView packages/app-shell/src/views/__tests__/RecordAttachmentsPanel packages/components/src/__tests__/page- packages/i18n/: 266 files, 3354 tests passed / 13 skipped, VERDICT command-exit 0.
  • vitest run packages/app-shell/src/utils … ObjectFieldInspector.relatedList-27054 RecordDetailView.harness (after the feat(spec, ui): master_detail children are overview body tables by default #35691 merge): 61 files, 990 tests passed. These failed once against a stale packages/spec dist and passed after a rebuild.

Other runs:

  • vitest run scripts/: 171 files, 5092 tests passed, VERDICT command-exit 0.
  • Playwright record-tabs-rail-35595.spec.ts: 5 passed.
  • type-check (plugin-detail, components, i18n, app-shell) after --filter '@object-ui/app-shell^...' build: all four Done, VERDICT command-exit 0.
Ablations (each restored with git checkout HEAD; blob equals HEAD and git diff HEAD is empty)
  • Went red: rail empty cards, rail order, rail rows cap, rail collapse, rail payload rows (28737), muted empty tab, band once (plugin-detail), band once at the page (ApprovalBandOnceScope dropped from RecordDetailView: the two-body test red, its CONTROL green), merged-tab no count (the whole idx < 0 guard), approval tag.
  • Stayed green: merged-tab with only the list half removed. That half has no pin of its own; noted.

Acceptance notes

Verification

Two-minute check: open a record that has several related lists on a 1280 × 800 window. Expect:

  • Overview first, one tab per list, Activity last;
  • the empty lists greyed with no number;
  • on Overview, the right column shows 审批 / 附件 / 最近动态 cards, then 其他相关, each with at most three rows;
  • clicking a card title switches to that tab, and the stage path and key fields disappear there;
  • opening the same record in a drawer shows no right column and no ⊟ switch.

Read first:

  1. ui/packages/plugin-detail/src/RecordSummaryRail.tsx: useSummaryRows and the payload hand-off, where a missed hand-off becomes an extra read.
  2. ui/packages/plugin-detail/src/RecordPageColumns.tsx: the tab list build and the Overview-only strip.
  3. ui/packages/app-shell/src/views/RecordDetailView.tsx: fallbackTabs, the approval tag click, and the !embedded switch.

Gates on head 7557c03: the 49 families dispatch-gates.mjs --commands derives were all run locally, and every one exited 0 (--ran: 49 derived, 49 run, 0 NOT-MEASURED, 0 UNRUN). check-platform-checklist --changed-from origin/main passed (7 anchors judged, 0 lost). type-check for plugin-detail, components, i18n and app-shell passed after a closure rebuild. Playwright passed 5/5. The wide run belongs to CI.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

…t sums up the other tabs

The record page's tab row folds by width only: Overview, one tab per side
related list in order (an empty one greyed, no number), then Attachments,
Approvals and Activity, the tail in 「更多 N ▾」 with its counts. The stage
path and key fields sit across the width on Overview only. On Overview the
right column sums up the other tabs (approvals, attachments, recent
activity, then the lists with records), at most three rows a card, each
title opening its tab; a drawer draws no rail and no switch. A page drawn
as written gets its unplaced approvals and attachments as tabs, not foot
bands, and draws one approval band however many details bodies it has.
Supersedes the records-first partition (objectstack#28469).

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 20, 2026
…red tabs; the rail reads a column through columnIdentity

On a runner with no CJK font a CJK glyph draws about 8 px, not 13, so the
twelve tabs of the fold fixture fit the 596 px row of a 900 px window and
nothing folded. The pin now draws once, reads the row's own measurer, and
sizes the row for exactly eight tabs and the trigger, half a tab short of
the ninth, asserting that every tab does not fit before reading the fold.

The rail's column key read field, accessorKey and name in one chain; it
now calls the shared columnIdentity reader (objectui#3104 ratchet).

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: ef96a83fb2d18d706604d2b3bd9934be557ac4ca · 2026-11-20T06:56Z

Readings

  • CI on this head: 52 success, 13 skipped, 0 failed. The PR-body guard succeeded after the body edit.
  • check-governed-merges --pr 35763: 0 of 66 paths are governed. 4,635 lines (+3,352 / −1,283), so it is over the 3,000 threshold. The seat ruled at 02:52Z that this ships as one PR and goes through the approver handoff after L1. About two thirds of the lines are tests and e2e.
  • K: 11.
  • Declared: Clause-②: no · Metadata-protocol: none · Fixes #35595, Fixes #35596.
  • Overlap: overlap-check exits 0 against origin/main. The earlier feat(app-shell, plugin-approvals): edit a record and its line tables in one save; a locked record locks its lines #35755 hunk, at RecordDetailView's authored SchemaRenderer line, no longer flags. Whichever of the two lands second passes layoutPage into withFallbackRecordTabs.

Claim and surface

What it changes

Fix round on this head (CI red on 7557c03)

  • The e2e fold failed because a CI runner without CJK fonts draws the tabs narrower. The spec now sizes the row from the row measurer's own readings, eight tabs plus the trigger. It passes with CJK fonts present and with them hidden.
  • The column-identity ratchet now goes through columnIdentity(). The inventory is unchanged.

Tests

  • plugin-detail vitest: 391 files, 3,563 tests.
  • RecordDetailView, components page-* and i18n: 266 files, 3,354 tests.
  • Playwright record-tabs-rail-35595.spec.ts: 5/5, with and without CJK fonts.
  • Ablations each went red and were restored with blob == HEAD: empty cards, order, rows cap, collapse, payload rows, muted empty tab, band-once in plugin-detail and at the page, merged-tab guard, approval tag, and the fold gap.
  • dispatch-gates --commands: 49 run, 0 not measured.

Not filed (noted)

  • Spec prose still says "shared Related tab".
  • RelatedCardStack and RecordTimelinePanel are no longer drawn on the record page.
  • The Attachments tab re-reads once under StrictMode only (dev).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 记录详情页的页签重排:第一个是「概览」,然后每张关联子表各一个页签(不管有没有记录),最后是附件、审批、动态;没有记录的页签变淡、不带数字,只在屏幕放不下时才收进「更多 N」。
  • 阶段条和关键字段只在「概览」里,占满整行;其他页签不再重复显示。
  • 「概览」右侧改成摘要卡:审批、附件、最近动态、其他有记录的子表,每张最多三行,点标题跳到对应页签;没内容的卡不显示,也不再有「还有 N 个空关联」。抽屉里没有右栏。页面底部不再挂审批区和附件卡,审批信息在页面上只出现一次。
  • 需要留意:读者原来可以在右栏拖动排序、隐藏子表卡片,这些按钮随卡片一起去掉了;已保存的顺序和隐藏仍然有效,也能「恢复默认顺序」,但不能再新调整。
  • 席位意见:通过。改动超过 3000 行,需要人工合并;合并前在更新说明里写明上面这一点,由席位确认是否另开卡把调整顺序/隐藏放回页签。

席位核对

ACCEPT · head ef96a83fb2 · Fixes #35595, Fixes #35596 (epic #35590, maintainer direct dispatch, p2 in scope; supersedes #28469) · K=11 · merge-tree vs origin/main clean; vs #35755 head e428aacfe2 clean · governed 0/66 · +3352/−1283, 66 files (4635 > 3000) · CI 52 success, 13 skipped, 0 pending · 2026-11-20T06:58Z

Routing: no packages/spec face, Clause-②: no, not governed; over 3000 lines → Tier H, human merge by GOVERNED_APPROVERS (one PR per the seat's 02:52Z ruling; handoff by the seat after R1).

Checked:

Required before landing:

  • R1 (changeset text, push + CI, no fresh L1). Two reader-visible removals are not in the changeset: (a) the related cards' ⠿ handle, ⌥↑ / ⌥↓ and 隐藏 leave the page with the cards, so a reader can no longer reorder or hide a related list; a stored order and stored hides still apply and 「恢复默认顺序」 / 「显示」 still undo them (the test header says so, the changeset does not); (b) the one 「Related」 tab's ?tab=related token is retired; a saved link with it opens 概览. One sentence each.

For the seat (not blocking):

Nits (no action required):

  • RelatedCardStack (the component) is no longer drawn by any page and its test file is gone; RecordPageColumns still imports two helpers from the module. Retire the component in the R2-style follow-up, or with the next card that touches it.
  • A related tab with no title falls back to the child's API name; hosts pass titles today.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

维护者速读

席位核对 — ACCEPT · repo:objectstack#5 · head 08f9d8a5ce6bec38e56c70fc9e0d1b020c629681 · 2026-11-20T07:24Z

  • Shape: 66 files, +3355/−1283: tab rules (synthTabs, buildDefaultTabs, RecordTabRow), the Overview rail (RecordSummaryRail in RecordPageColumns), the approval band drawn once (DetailView gate, defaultRecordPage.ts), header-region tweaks (approval tag opens Approvals; right-column switch hidden when embedded). Fixes #35595, Fixes #35596.
  • Contract review: none owed. UI only, no packages/spec.
  • L1: L1-a ACCEPT 7032791068 at ef96a83f; R1 (changeset text only) on top.
  • Gates: CI on this head 50 success, 0 failed. Mergeable clean. K = 13 (< 15).
  • Landing clause: over 3,000 lines → human-merge threshold. This stroke: ready, reviewers os-zhuang and hotlong, pm:awaiting-merge. After an APPROVED review from GOVERNED_APPROVERS, the owning area (ux-1) lands it.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 20, 2026 07:24
@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 20, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit b0c624a Nov 20, 2026
67 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-35595-record-tabs-rail branch November 20, 2026 07:54
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants